Don’t get the active item pointer before the grid/non-grid conditional,
because if we’re in grid mode, we re-get it before selecting it anyway.
g_object_set (priv->popup_widget, "menu-type-hint", GDK_WINDOW_TYPE_HINT_COMBO, NULL);
- active = gtk_menu_get_active (GTK_MENU (priv->popup_widget));
-
if (priv->wrap_width > 0 || priv->cell_view == NULL)
{
gtk_css_gadget_get_border_allocation (priv->gadget, &border_allocation, NULL);
GList *i;
GtkWidget *child;
+ active = gtk_menu_get_active (GTK_MENU (priv->popup_widget));
+
if (!(active && gtk_widget_get_visible (active)))
{
for (i = GTK_MENU_SHELL (priv->popup_widget)->priv->children; i && !active; i = i->next)